﻿@using QDT.Core
@using QDT.MVC.UI
@model QDT.Common.IPagedList<QDT.Core.Experience.ExpCredit>
@{
    ViewBag.Title = "体验宝";
}
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/jquery.validate.js")"> </script>
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/messages_zh.js")"> </script>
<script type="text/javascript">
    $().ready(function () {
        $('form').validate({
            rules: {
                Email: {
                    required: true
                }
            },
            messages: {
                Email: {
                    required: "<i class='ui-tiptext-icon iconfont' id='iusername-error'  title='出错'>&#xf0155;</i><span  style='color:Red;'>请输入邮箱！</span>"
                }
            },
            errorPlacement: function (error, element) {
                if (element.is("#Email")) {
                    error.appendTo('#email-error');
                }
            }
        });
        $("#Experience").css("background", "#e0524b");
        $("#Experience i,#Experience span").css("color", "white");
        $("#Experience .san-jiaoxing").css("display", "block");
    });
</script>
<style type="text/css">
    .ui-body
    {
        padding: 0;
        background-color: white;
    }
    .ui-grid-20
    {
        width: 778px;
        margin-left: -20px;
    }
</style>
<link href="/Content/Default/CSS/AllInvestList.css" rel="stylesheet" type="text/css" />
@Html.Action("_UserBanner")
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-grid-row">
            @Html.Action("UserMenu", new { route = MenuRoute.Experience })
            <div class="ui-grid-20" style="width: 778px;" id="right_box">
                <div class="ui-box">
                    <div style="height: 60px;font-size: 20px;">
                        <a href="@Url.Action("Experience", "User")">体验记录</a>
                    </div>
                    <div class="ui-table-container">
                        <table style="width: 100%">
                            <thead>
                                <tr>
                                    <th style="padding-left: 50px;">
                                        项目信息
                                    </th>
                                    <th class="th_center">
                                        体验债权
                                    </th>
                                    <th class="th_center">
                                        预期收益
                                    </th>
                                    <th class="th_center">
                                        是否还款
                                    </th>
                                </tr>
                            </thead>
                            <tbody id="datalist">
                                @foreach (var m in Model)
                                {
                                    var project = Html.F().GetExpProject(m.ExpProjectId);
                                    <tr>
                                        <td class="td_first">
                                            <span><a style="text-decoration: underline;font-size: 14px;" href="@Url.Action("Index", "Project", new { id = project.ID })">@project.Name</a></span>
                                            <div style="line-height: 20px; color: #9d9d9d;">
                                                <span>预期年化收益率：</span><span>@project.Rate<span>%</span></span>&nbsp;&nbsp;<span>期限：</span><span>@project.Days</span><span>天</span><br />
                                                <span>投标时间：</span><span>@m.CreateTime</span></div>
                                        </td>
                                        <td class="td_234">
                                            <span style="color:#27ae60">@m.Money.ToMoney()</span><br />
                                        </td>
                                        <td class="td_234">
                                            <span style="color:#27ae60">
                                                @(((m.Money) * ((decimal)project.Rate / 36000) * project.Days).ToMoney())
                                            </span>
                                        </td>
                                        <td class="td_234">
                                            @(m.IsRepay ? "已还款" : "未返还")
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
                <div style="text-align: center;">@Html.ClientPager(Model)</div>
            </div>
        </div>
    </div>
</div>
<div style="margin-top: -10px;">@Html.Partial("_BindBottomImage")</div>